Skip to content

chore: Change ints to 'number' for ProgressEvent properties #39574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

bsmth
Copy link
Member

@bsmth bsmth commented May 19, 2025

Description

The docs are explicit about ints here, and changes have landed allowing doubles:

https://xhr.spec.whatwg.org/#dom-progresseventinit-loaded

Related issues and pull requests

Fixes mdn/mdn#641

@bsmth bsmth requested a review from a team as a code owner May 19, 2025 11:24
@bsmth bsmth requested review from wbamberg and removed request for a team May 19, 2025 11:24
@github-actions github-actions bot added Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed labels May 19, 2025
@bsmth
Copy link
Member Author

bsmth commented May 19, 2025

CC @domenic

Copy link
Contributor

github-actions bot commented May 19, 2025

Preview URLs

(comment last updated: 2025-05-30 10:26:33)

Copy link
Member

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would need BCD too I reckon, +1 for content, but not sure if it fixes the issue completely.

Also as a reader I would be curious to know what a fraction of a byte even means.

@bsmth bsmth changed the title chore: Change ints to doubles for ProgressEvent properties chore: Change ints to 'number' for ProgressEvent properties May 30, 2025
@bsmth
Copy link
Member Author

bsmth commented May 30, 2025

Also as a reader I would be curious to know what a fraction of a byte even means.

Yeah that's a good point, motivation is:

This allows specifications to use ProgressEvents while not necessarily giving away the exact number of bytes, for example by using numbers between 0 and 1 … with 6 decimal digits

https://webmachinelearning.github.io/writing-assistance-apis/#note-download-progress-fraction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs size/s [PR only] 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update ProgressEvent documentation to show it allows doubles
3 participants